<?php

    #-------------------------------------------------------------#
	# This file is part of the Tekuna MVC Microframework for PHP. #
	# (c) 2009 Niels Jäckel <niels.jaeckel@tekuna.org>            #
	# Please visit http://tekuna.org/ for more information.       #
	#                                                             #
	# This software is licensed under the MIT License. Please     #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#


	abstract class AbstractTekunaTestCase extends UnitTestCase {

		protected $iErrorReporting = 0;


		public function setUp() {

			// override simpletest's error handlers
			set_error_handler('TekunaErrorHandler');
			set_exception_handler('TekunaExceptionHandler');

			// store old error level
			$this -> iErrorReporting = error_reporting();

			// set the required error level
			error_reporting(E_ALL);
		}


		public function tearDown() {

			// restore simpletest's error handlers
			restore_error_handler();
			restore_exception_handler();

			// restore previous error level
			error_reporting($this -> iErrorReporting);
		}
	}



